package eureka.domain.book;

import java.io.Serializable;

import eureka.domain.account.WebsiteUser;
import net.sf.json.JSON;
import net.sf.json.JSONSerializer;

public class BookFavorite implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private long fID;
	private WebsiteUser User;
	private BookItem Book;
	
	
	public long getFID() {
		return this.fID;
	}
	public void setFID(long fID) {
		this.fID = fID;
	}

	public WebsiteUser getUser() {
		return this.User;
	}
	public void setUser(WebsiteUser User) {
		this.User = User;
	}

	public BookItem getBook() {
		return this.Book;
	}
	public void setBook(BookItem Book) {
		this.Book = Book;
	}
	
	public static BookFavorite getDefaultEmpty() {
		BookFavorite bf = new BookFavorite();
		bf.fID = 0;
		bf.User = WebsiteUser.getDefaultEmpty();
		bf.Book = BookItem.getDefaultEmpty();
		return bf;
	}
	
	public BookFavorite() {
		super();
	}
    
    public JSON toJSON() {
    	return JSONSerializer.toJSON(this);
    }
}
